#pragma once
/*
 * Created by: Mark Lavrynenko
 * Email:	MarkLavrinenko@gmail.com
 * Project:	  Huffman
*/

#include <stdint.h>
#include "HuffmanOptions.h"

class FrequencyTable
{
public:
	FrequencyTable(void);
	FrequencyTable(uint8_t const* data, size_t len);
	void addByte(uint8_t byte);
	size_t totalCount() const;
	mytype countForByte(uint8_t byte);
// it's function of FTSerializer
	uint8_t* byteRepresentation(size_t& size);
private:
	size_t m_readed;
	mytype table[tableSize];
	// it's function of FTSerializer
	void writeHeader(uint8_t* ans, size_t size);
};

